import React, { Component, useContext, useState, useEffect, useReducer } from 'react'


export default function UseReducerChild (props) {
  // console.log(props)
  const { dispatch } = props

  return (
    <div>
      <button onClick={() => {
        dispatch({ type: 'decrement', payload: 9 })
        // history.go('http://localhost:8080/test')
      }}>+9</button>
      <button onClick={() => dispatch({ type: 'increment', payload: -6 })}>-6</button>
    </div>
  )
}
